#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QObject>
#include <QDebug>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QByteArray>
#include <QDebug>
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void slotCloseSerialPort();
    void slotLoadSerialPort();
    void slotSend();
public slots:
    void slotReadData();
    void slotOpenSerialPort(int index);
    void senddate(int index);
private slots:
    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
    QSerialPort* m_serialPort;
    QStringList m_serialPortName;
    QStringList zhiling;//存储发送的指令
    QString sdate;
};
#endif // MAINWINDOW_H
